#include "Utility/InterfaceConversion.hpp"
#include "Graphics/Colour.hpp"
#include "Math/Vector.hpp"
#include "Utility/Singleton.hpp"

#include "SFML/Graphics/Color.hpp"
#include "SFML/System/Vector2.hpp"

namespace Utility
{
	float SFMLScale( void )
	{
		return Utility::Singleton< sf::RenderWindow >::Get()->GetHeight() / 100.0f;
	}

	b2Vec2 Box2DVector( const Math::Vectorf &vec )
	{
		return b2Vec2( vec.x, vec.y );
	}

	Math::Vectorf CaffVector( const b2Vec2 &vec )
	{
		return Math::Vectorf( vec.x, vec.y );
	}

	Graphics::Colour CaffColour( const sf::Color &col )
	{
		return Graphics::Colour( ( unsigned short ) col.r, ( unsigned short ) col.g, ( unsigned short ) col.b, ( unsigned short ) col.a );
	}

	sf::Color SFMLColour( const Graphics::Colour &col )
	{
		return sf::Color( ( sf::Uint8 ) col.r, ( sf::Uint8 ) col.g, ( sf::Uint8 ) col.b, ( sf::Uint8 ) col.a );
	}
}